<html>
  <head>
    <title>Pie</title>
    <script type="text/javascript" src="../protovis-d3.1.js"></script>
  </head>
  <body>
    <script type="text/javascript+protovis">

var data = pv.range(10).map(Math.random).sort(pv.reverseOrder),
    w = 400,
    h = 400,
    r = w / 2,
    a = pv.Scale.linear(0, pv.sum(data)).range(0, 2 * Math.PI);

var vis = new pv.Panel()
    .width(w)
    .height(h);

vis.add(pv.Wedge)
    .data(data)
    .bottom(w / 2)
    .left(w / 2)
    .outerRadius(r)
    .angle(a)
    .title(function(d) d)
  .add(pv.Wedge) // invisible wedge to offset label
    .visible(function(d) d > .15)
    .innerRadius(2 * r / 3)
    .outerRadius(r)
    .fillStyle(null)
  .anchor("center").add(pv.Label)
    .textAngle(0)
    .text(function(d) d.toFixed(2));

vis.render();

    </script>
  </body>
</html>
